From 8c11228483640c487642ebf8375935f863bfd591 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Mon, 31 Dec 2012 20:15:32 +0100 Subject: [PATCH] Fixes: debbugs:13316 * emacs-lisp/byte-run.el (defmacro): Don't lose final nil if neither DOCSTRING nor DECL was given. --- lisp/ChangeLog | 5 +++++ lisp/emacs-lisp/byte-run.el | 10 +++++----- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index b8e8f88fa6e..dde89ba1064 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2012-12-31 Andreas Schwab + + * emacs-lisp/byte-run.el (defmacro): Don't lose final nil if + neither DOCSTRING nor DECL was given. (Bug#13316) + 2012-12-30 Glenn Morris * net/mairix.el (rmail, rmail-summary-displayed, rmail-summary): diff --git a/lisp/emacs-lisp/byte-run.el b/lisp/emacs-lisp/byte-run.el index 544b64bc3a6..0cbf2616ba2 100644 --- a/lisp/emacs-lisp/byte-run.el +++ b/lisp/emacs-lisp/byte-run.el @@ -128,12 +128,12 @@ DECLS is a list of elements of the form (PROP . VALUES). These are interpreted according to `macro-declarations-alist'. The return value is undefined." (if (stringp docstring) nil - (if decl (setq body (cons decl body))) - (setq decl docstring) - (setq docstring nil)) + (setq body (cons decl body)) + (setq decl docstring) + (setq docstring nil)) (if (or (null decl) (eq 'declare (car-safe decl))) nil - (setq body (cons decl body)) - (setq decl nil)) + (setq body (cons decl body)) + (setq decl nil)) (if (null body) (setq body '(nil))) (if docstring (setq body (cons docstring body))) ;; Can't use backquote because it's not defined yet! -- 2.30.2